/* WP Demo - Frontend Styles */

/* Reset for plugin context */
.wp-demo-launcher { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.wp-demo-launcher *, .wp-demo-launcher *::before, .wp-demo-launcher *::after { box-sizing: border-box; }

/* Launcher */
.wp-demo-launcher__title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: #1a1a2e;
}
.wp-demo-launcher__desc {
    text-align: center;
    color: #6b7280;
    margin-bottom: 32px;
    font-size: 16px;
}

/* Product grid */
.wp-demo-products {
    display: grid;
    grid-template-columns: repeat(var(--columns, 3), 1fr);
    gap: 24px;
    margin-bottom: 32px;
}
@media (max-width: 768px) {
    .wp-demo-products { grid-template-columns: 1fr; }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .wp-demo-products { grid-template-columns: repeat(2, 1fr); }
}

/* Product card */
.wp-demo-product-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.wp-demo-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.wp-demo-product-card__thumb {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f3f4f6;
}
.wp-demo-product-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wp-demo-product-card__body {
    padding: 20px;
}
.wp-demo-product-card__body h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #1a1a2e;
}
.wp-demo-product-card__body p {
    color: #6b7280;
    font-size: 14px;
    margin: 8px 0;
    line-height: 1.5;
}
.wp-demo-product-card__meta {
    display: flex;
    gap: 12px;
    margin: 12px 0;
    font-size: 13px;
    color: #9ca3af;
}

/* Badges */
.wp-demo-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.wp-demo-badge--plugin { background: #dbeafe; color: #1e40af; }
.wp-demo-badge--theme { background: #fef3c7; color: #92400e; }

/* Buttons */
.wp-demo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: 2px solid transparent;
    line-height: 1.4;
}
.wp-demo-btn--primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.wp-demo-btn--primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}
.wp-demo-btn--outline {
    background: transparent;
    color: #2563eb;
    border-color: #2563eb;
}
.wp-demo-btn--outline:hover {
    background: #eff6ff;
    color: #1d4ed8;
}
.wp-demo-btn--lg {
    padding: 14px 28px;
    font-size: 16px;
    width: 100%;
}
.wp-demo-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.wp-demo-try-btn { width: 100%; margin-top: 12px; }

/* Form */
.wp-demo-form {
    max-width: 480px;
    margin: 0 auto;
    padding: 32px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}
.wp-demo-form__field {
    margin-bottom: 20px;
}
.wp-demo-form__field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.wp-demo-form__field .required { color: #ef4444; }
.wp-demo-form__input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    outline: none;
}
.wp-demo-form__input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.wp-demo-form__error {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 12px;
}

/* Spinner */
.wp-demo-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: wp-demo-spin 0.6s linear infinite;
}
@keyframes wp-demo-spin {
    to { transform: rotate(360deg); }
}

/* Modal */
.wp-demo-modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
}
.wp-demo-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wp-demo-modal__content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 100000;
}
.wp-demo-modal__close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
}
.wp-demo-modal__close:hover { color: #374151; }
.wp-demo-modal__title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 20px;
    color: #1a1a2e;
}
.wp-demo-modal__body .wp-demo-form {
    padding: 0;
    border: none;
    max-width: 100%;
}

/* Result */
.wp-demo-result {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.6);
}
.wp-demo-result__card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
}
.wp-demo-result__icon { font-size: 48px; margin-bottom: 16px; }
.wp-demo-result__card h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 12px;
}
.wp-demo-result__message {
    color: #6b7280;
    margin-bottom: 20px;
}
.wp-demo-result__credentials {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
}
.wp-demo-credential {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}
.wp-demo-credential label {
    font-weight: 600;
    color: #374151;
    font-size: 13px;
}
.wp-demo-credential code {
    background: #e5e7eb;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    user-select: all;
}
.wp-demo-result__link {
    display: block;
    margin-bottom: 12px;
}
.wp-demo-result__frontend-link {
    display: block;
    margin-bottom: 16px;
}
.wp-demo-result__timer {
    color: #9ca3af;
    font-size: 13px;
}

/* Single product */
.wp-demo-single-product {
    text-align: center;
    margin-bottom: 24px;
}
.wp-demo-single-product__thumb {
    max-width: 200px;
    border-radius: 12px;
    margin-bottom: 16px;
}
.wp-demo-single-product h3 {
    font-size: 24px;
    margin: 0 0 8px;
}
.wp-demo-meta {
    color: #9ca3af;
    font-size: 14px;
}

/* reCAPTCHA centering */
.wp-demo-form .g-recaptcha {
    display: flex;
    justify-content: center;
}
