/**
 * ISC Customer Flow - Frontend Styles
 */

/* Category Filter */
.iscf-category-filter {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.iscf-category-filter label {
    font-weight: 600;
    margin-right: 10px;
}

.iscf-category-select {
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Subdomain Wrapper */
.iscf-subdomain-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

.iscf-subdomain-wrapper input {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.iscf-domain-suffix {
    background: #f0f0f0;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-left: none;
    border-radius: 0 4px 4px 0;
    color: #666;
    font-family: monospace;
    white-space: nowrap;
}

/* Subdomain Status */
.iscf-subdomain-status {
    margin-top: 8px;
    font-size: 13px;
    min-height: 20px;
}

.iscf-subdomain-status.available {
    color: #46b450;
}

.iscf-subdomain-status.taken,
.iscf-subdomain-status.error {
    color: #dc3232;
}

.iscf-subdomain-status.checking {
    color: #666;
}

/* Full URL Preview */
.iscf-full-url {
    margin-top: 10px;
}

.iscf-url-preview {
    background: #e7f7e7;
    padding: 10px 15px;
    border-radius: 4px;
    display: inline-block;
    font-size: 14px;
}

.iscf-url-preview strong {
    font-family: monospace;
    color: #0073aa;
}

/* Access Denied Message */
.iscf-access-denied {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    margin: 20px 0;
}

.iscf-access-denied p {
    margin: 0;
    color: #856404;
}

.iscf-access-denied a {
    color: #0073aa;
    text-decoration: underline;
}

/* Returning User Prompt */
.iscf-returning-user-prompt {
    padding: 20px;
    background: #e7f7ff;
    border: 1px solid #0073aa;
    border-radius: 4px;
    margin-bottom: 20px;
}

.iscf-returning-user-prompt h3 {
    margin: 0 0 10px;
    color: #0073aa;
}

.iscf-returning-user-prompt p {
    margin: 0 0 15px;
}

.iscf-returning-user-prompt .button {
    margin-right: 10px;
}

/* Step Progress Indicator (optional) */
.iscf-step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0;
    list-style: none;
}

.iscf-step-indicator li {
    flex: 1;
    text-align: center;
    position: relative;
    padding-top: 30px;
}

.iscf-step-indicator li::before {
    content: attr(data-step);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: #ddd;
    border-radius: 50%;
    line-height: 24px;
    font-size: 12px;
    font-weight: bold;
    color: #666;
}

.iscf-step-indicator li.active::before,
.iscf-step-indicator li.completed::before {
    background: #0073aa;
    color: #fff;
}

.iscf-step-indicator li.completed::before {
    content: "✓";
}

.iscf-step-indicator li::after {
    content: "";
    position: absolute;
    top: 11px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #ddd;
}

.iscf-step-indicator li:last-child::after {
    display: none;
}

.iscf-step-indicator li.completed::after {
    background: #0073aa;
}

/* Form Step Labels */
.iscf-step-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

/* Loading State */
.iscf-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.iscf-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: iscf-spin 1s linear infinite;
}

@keyframes iscf-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Account Form - Login Mode (existing user) */
/* Hide password confirmation field and strength indicator */
.iscf-login-mode .ginput_right,
.iscf-login-mode .ginput_password.ginput_right,
.iscf-login-mode [id$="_2_2_container"],
.iscf-login-mode .gfield_password_strength,
.iscf-login-mode [id$="_strength_indicator"],
.iscf-login-mode input[name$="_strength"] {
    display: none !important;
}

/* Make password field full width in login mode */
.iscf-login-mode .ginput_left,
.iscf-login-mode .ginput_password.ginput_left {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

/* Hide the description about password requirements in login mode */
.iscf-login-mode .gfield_description {
    display: none !important;
}

/* Forgot password link */
.iscf-forgot-password {
    margin-top: 12px;
}

.iscf-forgot-password a {
    color: #666;
    text-decoration: underline;
    font-size: 13px;
}

.iscf-forgot-password a:hover {
    color: #0073aa;
}

/* Account Form - Register Mode (new user) */
.iscf-register-mode + .iscf-forgot-password {
    display: none;
}

/* Redirect Notice */
.iscf-redirect-notice {
    padding: 24px;
    background: #f0f7fb;
    border: 1px solid #b8daef;
    border-radius: 6px;
    text-align: center;
}

.iscf-redirect-notice p {
    margin: 0 0 16px;
    font-size: 16px;
}

.iscf-redirect-notice .button {
    display: inline-block;
    padding: 12px 24px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.iscf-redirect-notice .button:hover {
    background: #005a87;
    color: #fff;
}

/* ==========================================================================
   Review Page (Cart) - Add-on Products
   ========================================================================== */

.iscf-addon-products {
    margin: 40px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.iscf-addon-products h2 {
    margin: 0 0 10px;
    font-size: 1.5rem;
    color: #212529;
}

.iscf-addon-intro {
    margin: 0 0 25px;
    color: #6c757d;
    font-size: 1rem;
}

.iscf-addon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.iscf-addon-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.iscf-addon-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #0073aa;
}

.iscf-addon-content {
    flex: 1;
}

.iscf-addon-title {
    margin: 0 0 10px;
    font-size: 1.125rem;
    color: #212529;
}

.iscf-addon-description {
    margin: 0 0 15px;
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
}

.iscf-addon-price {
    font-size: 1.125rem;
    font-weight: 600;
    color: #0073aa;
    margin-bottom: 15px;
}

.iscf-addon-action {
    margin-top: auto;
}

.iscf-addon-button {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 12px 20px;
    background: #28a745;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.iscf-addon-button:hover {
    background: #218838;
    color: #fff !important;
}

.iscf-addon-unavailable {
    display: inline-block;
    padding: 12px 20px;
    background: #e9ecef;
    color: #6c757d;
    border-radius: 4px;
    text-align: center;
    width: 100%;
}

/* ==========================================================================
   Review Page (Cart) - Subscription Terms
   ========================================================================== */

.iscf-subscription-terms {
    background: #f8f9fa;
}

.iscf-subscription-terms th {
    text-align: left;
    padding: 20px;
}

.iscf-subscription-info h4 {
    margin: 0 0 15px;
    font-size: 1rem;
    color: #212529;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.iscf-subscription-item {
    margin-bottom: 15px;
}

.iscf-subscription-item:last-child {
    margin-bottom: 0;
}

.iscf-subscription-item strong {
    display: block;
    margin-bottom: 5px;
    color: #212529;
}

.iscf-subscription-item ul {
    margin: 0;
    padding: 0 0 0 20px;
    list-style: disc;
}

.iscf-subscription-item li {
    margin: 5px 0;
    color: #495057;
    font-size: 0.9rem;
}

/* Progress indicator on cart page */
.woocommerce-cart .iscf-progress-indicator {
    margin-bottom: 30px;
}

