/* HostRenew Form Component Styles */
/* Color Scheme: Blue (#3568DD) and Red (#FF3B4E) */

:root {
    --primary-red: #FF3B4E;
    --primary-blue: #3568DD;
    --dark-blue: #2551b8;
    --border-color: #d1d5db;
    --text-primary: #14171a;
    --text-secondary: #6b7280;
    --error-color: #e0245e;
    --success-color: #17bf63;
    --border-radius: 6px;
    --transition: all 0.2s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: #ffffff;
}

.hostrenew-container {
    max-width: 100%;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.form-wrapper {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 20px;
    width: 100%;
    max-width: 520px;
}

.hostrenew-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.input-icon {
    width: 16px;
    height: 16px;
    color: var(--primary-blue);
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: #ffffff;
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
    font-family: inherit;
}

.form-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(53, 104, 221, 0.1);
}

.form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    padding-right: 36px;
    cursor: pointer;
}

.form-input.error {
    border-color: var(--error-color);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.form-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    cursor: pointer;
    accent-color: var(--primary-blue);
    margin-top: 2px;
}

.checkbox-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
}

.checkbox-icon {
    width: 16px;
    height: 16px;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.error-message {
    font-size: 12px;
    color: var(--error-color);
    display: none;
}

.error-message.show {
    display: block;
}

.reminder-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background-color: #eff6ff;
    border-left: 3px solid var(--primary-blue);
    border-radius: var(--border-radius);
    font-size: 12px;
    color: var(--dark-blue);
    margin-top: 4px;
}

.info-icon {
    width: 16px;
    height: 16px;
    color: var(--primary-blue);
    flex-shrink: 0;
}

.submit-button {
    width: 100%;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background-color: var(--primary-red);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    font-family: inherit;
}

.submit-button:hover:not(:disabled) {
    background-color: #e6344a;
}

.submit-button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.button-loader {
    display: inline-block;
}

.spinner {
    animation: rotate 1s linear infinite;
    width: 18px;
    height: 18px;
}

.spinner-path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.form-feedback {
    padding: 10px 12px;
    border-radius: var(--border-radius);
    font-size: 13px;
    font-weight: 500;
    margin-top: 12px;
}

.form-feedback.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.form-feedback.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.feedback-message {
    margin: 0;
}

/* SMS Opt-in Popup Modal */
.sms-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease-in-out;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.sms-popup-modal {
    background: #ffffff;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sms-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 10;
}

.sms-popup-close:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.sms-popup-content {
    padding: 0;
    text-align: center;
}

.sms-popup-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 0 24px 0;
    display: block;
    border-radius: 0;
}

.sms-popup-text-content {
    padding: 0 32px 32px;
}

.sms-popup-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.sms-popup-subtitle {
    font-size: 18px;
    font-weight: 500;
    color: #374151;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.sms-popup-disclaimer {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 24px 0;
    font-style: italic;
}

.sms-popup-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sms-popup-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s;
    box-sizing: border-box;
}

.sms-popup-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(53, 104, 221, 0.1);
}

.sms-popup-input.error {
    border-color: var(--error-color);
}

.sms-popup-error {
    font-size: 13px;
    color: var(--error-color);
    text-align: left;
    display: none;
    margin-top: -8px;
}

.sms-popup-error.show {
    display: block;
}

.sms-consent-wrapper {
    margin: 12px 0;
}

.sms-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.sms-consent-checkbox {
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.sms-consent-text {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.sms-consent-text a {
    color: var(--primary-blue);
    text-decoration: underline;
}

.sms-popup-button {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sms-popup-button-primary {
    background-color: var(--primary-blue);
    color: #ffffff;
}

.sms-popup-button-primary:hover:not(:disabled) {
    background-color: #2952b8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(53, 104, 221, 0.3);
}

.sms-popup-button-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sms-popup-button-secondary {
    background-color: transparent;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.sms-popup-button-secondary:hover {
    background-color: #f9fafb;
    color: #374151;
}

.sms-button-loader {
    display: inline-block;
}

.sms-button-loader .spinner {
    width: 18px;
    height: 18px;
}

/* Celebration view specific styles */
.celebration-image {
    max-width: 300px !important;
    margin: 0 auto;
    display: block;
}

.celebration-text {
    text-align: center;
}

.sms-popup-celebration {
    font-size: 16px;
    color: #374151;
    margin: 16px 0 24px 0;
    line-height: 1.6;
}

.sms-popup-celebration strong {
    color: var(--primary-blue);
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 600px) {
    .form-wrapper {
        padding: 16px;
    }

    .form-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* SMS Popup mobile adjustments */
    .sms-popup-overlay {
        align-items: flex-start;
        padding: 10px;
    }

    .sms-popup-modal {
        margin-top: 20px;
        margin-bottom: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .sms-popup-content {
        padding: 20px;
    }

    .sms-popup-image {
        max-width: 100%;
        margin-bottom: 16px;
    }

    .sms-popup-title {
        font-size: 20px;
    }

    .sms-popup-subtitle {
        font-size: 16px;
    }

    .sms-popup-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}
