/* Toy Box Collector Frontend Styles */

.tbc-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.tbc-form-title {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

.tbc-update-notice {
    background: #e7f3ff;
    border: 1px solid #72aee6;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.tbc-update-notice p {
    margin: 0;
    color: #0073aa;
}

/* Form Styles */
.tbc-form {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tbc-fieldset {
    border: none;
    margin: 0;
    padding: 30px;
    border-bottom: 1px solid #e1e1e1;
}

.tbc-fieldset:last-child {
    border-bottom: none;
}

.tbc-fieldset legend {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding: 0;
    width: 100%;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.tbc-form-row {
    margin-bottom: 20px;
}

.tbc-form-row:last-child {
    margin-bottom: 0;
}

.tbc-form-row-half {
    display: flex;
    gap: 20px;
}

.tbc-form-row-thirds {
    display: flex;
    gap: 15px;
}

.tbc-form-col {
    flex: 1;
}

.tbc-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.tbc-label.required .required {
    color: #d63638;
    margin-left: 3px;
}

.tbc-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.tbc-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.tbc-input-error {
    border-color: #d63638 !important;
    box-shadow: 0 0 0 3px rgba(214, 54, 56, 0.1) !important;
}

.tbc-number-input {
    max-width: 120px;
}

.tbc-file-input {
    padding: 8px 12px;
    background: #f9f9f9;
}

.tbc-help-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.tbc-error {
    display: block;
    margin-top: 5px;
    color: #d63638;
    font-size: 12px;
    font-weight: 500;
}

.tbc-current-logo {
    margin-top: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.tbc-current-logo p {
    margin: 0 0 10px 0;
    font-weight: 500;
}

/* Radio Group Styles */
.tbc-radio-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.tbc-radio-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 15px;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.tbc-radio-label:hover {
    border-color: #0073aa;
    background: #f8f9fa;
}

.tbc-radio-label.tbc-radio-selected {
    border-color: #0073aa;
    background: #e7f3ff;
    box-shadow: 0 0 0 1px #0073aa;
}

.tbc-radio-label input[type="radio"] {
    margin: 0 12px 0 0;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.tbc-radio-text {
    flex: 1;
}

.tbc-radio-text small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* Form Actions */
.tbc-form-actions {
    padding: 30px;
    background: #f8f9fa;
    text-align: center;
}

.tbc-submit-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 180px;
}

.tbc-submit-btn:hover:not(:disabled) {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.tbc-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.tbc-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tbc-btn-loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Messages */
.tbc-messages {
    margin: 20px 0;
    padding: 15px 20px;
    border-radius: 6px;
    font-weight: 500;
}

.tbc-messages.tbc-success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.tbc-messages.tbc-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c2c7;
}

.tbc-messages.tbc-warning {
    background: #fff3cd;
    color: #664d03;
    border: 1px solid #ffecb5;
}

.tbc-messages p {
    margin: 0;
}

/* Modal Styles */
.tbc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.tbc-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tbc-modal-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid #e1e1e1;
}

.tbc-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.tbc-modal-body {
    padding: 25px 30px 30px;
}

.tbc-modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.tbc-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 120px;
}

.tbc-btn-primary {
    background: #0073aa;
    color: white;
}

.tbc-btn-primary:hover:not(:disabled) {
    background: #005a87;
}

.tbc-btn-secondary {
    background: #6c757d;
    color: white;
}

.tbc-btn-secondary:hover:not(:disabled) {
    background: #5a6268;
}

.tbc-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.tbc-success-icon {
    font-size: 48px;
    color: #28a745;
    text-align: center;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tbc-form-container {
        padding: 15px;
    }
    
    .tbc-fieldset {
        padding: 20px 15px;
    }
    
    .tbc-form-row-half,
    .tbc-form-row-thirds {
        flex-direction: column;
        gap: 15px;
    }
    
    .tbc-form-title {
        font-size: 24px;
    }
    
    .tbc-modal {
        padding: 10px;
    }
    
    .tbc-modal-header,
    .tbc-modal-body {
        padding: 20px;
    }
    
    .tbc-modal-actions {
        flex-direction: column;
    }
    
    .tbc-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .tbc-form-container {
        padding: 10px;
    }
    
    .tbc-fieldset {
        padding: 15px 10px;
    }
    
    .tbc-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .tbc-submit-btn {
        width: 100%;
        padding: 18px 20px;
    }
}

/* Address Autocomplete Enhancements */
.pac-container {
    z-index: 10001;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pac-item {
    padding: 12px 16px;
    border-bottom: 1px solid #e1e1e1;
    cursor: pointer;
}

.pac-item:hover {
    background: #f8f9fa;
}

.pac-item:last-child {
    border-bottom: none;
}

/* Loading States */
.tbc-loading {
    position: relative;
    pointer-events: none;
}

.tbc-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Focus Management */
.tbc-input:focus,
.tbc-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .tbc-input {
        border-width: 3px;
    }
    
    .tbc-submit-btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .tbc-modal {
        display: none !important;
    }
    
    .tbc-form {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .tbc-submit-btn {
        display: none;
    }
}
