/* Y Text Me - Frontend Styles */

.ytm-form-container {
    max-width: 100%;
    margin: 0 auto;
}

.ytm-sms-form {
    padding: 20px;
}

.ytm-form-group {
    margin-bottom: 20px;
}

.ytm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.ytm-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    margin-bottom: 0;
}

.ytm-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.ytm-input::placeholder {
    color: #999;
}

.ytm-field-description {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.ytm-form-actions {
    margin-top: 20px;
}

.ytm-submit-btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background-color: #0073aa;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.ytm-submit-btn:hover {
    background-color: #005a87;
}

.ytm-submit-btn:active {
    transform: scale(0.98);
}

.ytm-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.ytm-submit-btn.loading {
    position: relative;
    color: transparent;
}

.ytm-submit-btn.loading:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: ytm-spin 0.8s linear infinite;
}

@keyframes ytm-spin {
    to {
        transform: rotate(360deg);
    }
}

.ytm-message {
    margin-top: 8px;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 14px;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .ytm-sms-form {
        padding: 15px;
    }
    
    .ytm-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .ytm-submit-btn {
        width: 100%;
        padding: 14px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .ytm-form-group label {
        color: #e0e0e0;
    }
    
    .ytm-input {
        background-color: #2a2a2a;
        color: #e0e0e0;
        border-color: #444;
    }
    
    .ytm-field-description {
        color: #999;
    }
}
