/* Apply to Buy Form Styles */

.cc-apply-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Info Notice */
.cc-apply-notice {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 4px;
}

.cc-apply-notice p {
    margin: 0;
    line-height: 1.6;
    color: #1565c0;
}

/* Sections */
.cc-apply-section {
    background: #fff;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.cc-apply-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 22px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.cc-apply-section .cc-form-group {
	position: relative;
}

/* Form Groups */
.cc-form-group {
    margin-bottom: 20px;
}

.cc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.cc-form-group label .required {
    color: #dc3545;
}

.cc-form-group label .optional {
    color: #999;
    font-weight: normal;
    font-size: 13px;
}

.cc-form-group input[type="text"],
.cc-form-group input[type="email"],
.cc-form-group input[type="tel"],
.cc-form-group input[type="file"],
.cc-form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.cc-form-group select {
    background-color: #fff;
    cursor: pointer;
}

.cc-form-group input[type="file"] {
    padding: 8px;
}

.cc-file-info {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #666;
}

/* Form Rows */
.cc-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
}

.cc-form-col-half {
    flex: 1;
}

.cc-form-col-third {
    flex: 1;
}

.cc-form-col-quarter {
    flex: 1;
    min-width: 0;
}

/* Form row with thirds */
.cc-form-row-thirds {
    display: flex;
    gap: 15px;
}

.cc-form-row-thirds .cc-form-col-third {
    flex: 1;
}

/* License Entry */
.cc-license-entry {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    border-left: 4px solid #0073aa;
}

.cc-license-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

.cc-license-header h3 {
    margin: 0;
    color: #0073aa;
    font-size: 18px;
}

.cc-remove-license-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s;
}

.cc-remove-license-btn:hover {
    background: #c82333;
}

.cc-remove-license-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Add License Button */
.cc-btn-add-license {
    background: #f0f0f0;
    color: #555;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.cc-btn-add-license:hover {
    background: #e0e0e0;
    border-color: #ccc;
    color: #333;
}

.cc-btn-add-license .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Selected Files Preview */
.cc-selected-files {
    margin-top: 10px;
}

.cc-file-preview {
    background: #fff;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.cc-file-preview > strong {
    display: block;
    margin-bottom: 8px;
    color: #333;
}

.cc-files-preview-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cc-file-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    margin-bottom: 5px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    transition: background 0.2s;
}

.cc-file-preview-item:hover {
    background: #f0f0f0;
}

.cc-file-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.cc-file-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cc-file-preview-name {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cc-file-preview-size {
    font-size: 12px;
    color: #666;
}

.cc-remove-file-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 4px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.cc-remove-file-btn:hover {
    background: #c82333;
}

.cc-remove-file-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

/* Submit Section */
.cc-apply-submit {
    background: #fff;
    padding: 30px;
    border-radius: 5px;
    text-align: center;
}

.cc-apply-submit .button {
    background-color: #0073aa;
    color: #fff;
    padding: 14px 40px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 600;
}

.cc-apply-submit .button:hover {
    background-color: #005177;
}

.cc-apply-submit .button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Messages */
#cc-submit-message {
    margin-top: 20px;
}

.cc-success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.cc-error-message {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.cc-loading {
    color: #0073aa;
    font-weight: 600;
}

/* ===========================
   TOAST NOTIFICATIONS
   =========================== */

.cc-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 999999;
    min-width: 300px;
    max-width: 600px;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-size: 15px;
    line-height: 1.5;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    word-wrap: break-word;
}

.cc-toast-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.cc-toast-success {
    background: #10b981;
    color: #fff;
    border-left: 4px solid #059669;
}

.cc-toast-error {
    background: #ef4444;
    color: #fff;
    border-left: 4px solid #dc2626;
}

.cc-toast-info {
    background: #3b82f6;
    color: #fff;
    border-left: 4px solid #2563eb;
}

.cc-toast::before {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.cc-toast:hover::before {
    opacity: 1;
}

/* ===========================
   MULTI-STEP FORM STYLES (COMPACT & MODERN)
   =========================== */

/* Progress Indicator - Compact Version */
.cc-progress-container {
    background: #fff;
    padding: 16px 20px; /* Even more compact */
    margin-bottom: 20px;
    border-radius: 12px; /* More modern rounded corners */
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.cc-progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px; /* Reduced spacing */
    position: relative;
    gap: 8px;
}

.cc-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

.cc-step-number {
    width: 32px; /* Even smaller - from 36px */
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px; /* Smaller font */
    margin-bottom: 4px; /* Tighter spacing */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.cc-step-label {
    font-size: 11px; /* Smaller text */
    color: #6b7280;
    font-weight: 500;
    text-align: center;
    transition: color 0.3s;
    line-height: 1.2;
}

.cc-progress-step.active .cc-step-number {
    background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
    color: #fff;
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.25);
    transform: scale(1.08);
}

.cc-progress-step.active .cc-step-label {
    color: #0073aa;
    font-weight: 600;
}

.cc-progress-step.completed .cc-step-number {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

/* NO checkmark */
.cc-progress-step.completed .cc-step-number::before {
    content: none;
}

.cc-progress-bar {
    height: 4px; /* Thinner bar */
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.cc-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa 0%, #005177 100%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

/* Form Steps */
.cc-form-step {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.cc-form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

.cc-form-step.leaving {
    animation: fadeOut 0.2s ease-in-out;
}

/* Form Navigation */
.cc-form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding: 0 30px;
}

.cc-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cc-btn-next,
.cc-btn-submit {
    background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.2);
    margin-left: auto;
}

.cc-btn-next:hover,
.cc-btn-submit:hover {
    background: linear-gradient(135deg, #005177 0%, #003d5c 100%);
    box-shadow: 0 6px 16px rgba(0, 115, 170, 0.3);
    transform: translateY(-2px);
}

.cc-btn-prev {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.cc-btn-prev:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.cc-btn:disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Review Section */
.cc-review-intro {
    background: #f0f9ff;
    border-left: 4px solid #0ea5e9;
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 4px;
    color: #0c4a6e;
}

.cc-review-section {
    background: #f9fafb;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.cc-review-section h3 {
    margin: 0 0 16px 0;
    color: #0073aa;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cc-review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.cc-review-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cc-review-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cc-review-value {
    font-size: 15px;
    color: #111827;
    font-weight: 500;
}

.cc-review-licenses {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cc-review-license {
    background: #fff;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.cc-review-license-header {
    font-weight: 600;
    color: #0073aa;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.cc-review-files {
    margin-top: 8px;
}

.cc-review-files-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
    display: block;
}

.cc-review-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cc-review-file-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 999px;
    font-size: 13px;
    color: #0c4a6e;
}

.cc-edit-section-btn {
    background: transparent;
    border: none;
    color: #0073aa;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    text-decoration: underline;
    transition: color 0.2s;
}

.cc-edit-section-btn:hover {
    color: #005177;
}

/* ===========================
   SMARTY ADDRESS AUTOCOMPLETE
   =========================== */

.cc-smarty-autocomplete {
    position: relative;
}

.cc-smarty-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: -1px;
}

.cc-smarty-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}

.cc-smarty-suggestion-item:last-child {
    border-bottom: none;
}

.cc-smarty-suggestion-item:hover,
.cc-smarty-suggestion-item.selected {
    background-color: #f0f9ff;
    color: #0073aa;
}

.cc-smarty-suggestion-item strong {
    color: #0073aa;
    font-weight: 600;
}

/* Loading state */
#cc-address-search.loading {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 50 50'%3E%3Cpath fill='%230073aa' d='M25,5A20.14,20.14,0,0,1,45,22.88a2.51,2.51,0,0,0,2.49,2.26h0A2.52,2.52,0,0,0,50,22.33a25.14,25.14,0,0,0-50,0,2.52,2.52,0,0,0,2.5,2.81h0A2.51,2.51,0,0,0,5,22.88,20.14,20.14,0,0,1,25,5Z'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='0.6s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px 20px;
    padding-right: 40px;
}

/* Selected Address Display */
.cc-selected-address {
    margin-top: 15px;
    padding: 16px;
    background: #f0f9ff;
    border: 2px solid #0ea5e9;
    border-radius: 6px;
}

.cc-address-display strong {
    display: block;
    margin-bottom: 8px;
    color: #0c4a6e;
    font-size: 14px;
}

.cc-address-display div {
    margin-bottom: 12px;
    color: #1e293b;
    font-size: 15px;
    line-height: 1.5;
}

.cc-btn-change-address {
    background: transparent;
    border: 1px solid #0ea5e9;
    color: #0ea5e9;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.cc-btn-change-address:hover {
    background: #0ea5e9;
    color: #fff;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 768px) {
    .cc-apply-container {
        padding: 10px;
    }

    .cc-apply-section,
    .cc-apply-submit {
        padding: 20px;
    }

    .cc-form-row,
    .cc-form-row-thirds {
        flex-direction: column;
        gap: 0;
    }
    
    .cc-form-col-quarter {
        flex-basis: 100%;
    }

    .cc-license-entry {
        padding: 15px;
    }

    .cc-license-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cc-toast {
        left: 10px;
        right: 10px;
        transform: translateX(0) translateY(-100px);
        min-width: auto;
        max-width: none;
    }
    
    .cc-toast-show {
        transform: translateX(0) translateY(0);
    }
    
    .cc-progress-container {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .cc-progress-steps {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .cc-progress-step {
        flex-basis: calc(50% - 8px);
    }
    
    .cc-step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .cc-step-label {
        font-size: 11px;
    }
    
    .cc-form-navigation {
        flex-direction: column;
    }
    
    .cc-btn-next,
    .cc-btn-submit {
        margin-left: 0;
    }
    
    .cc-review-grid {
        grid-template-columns: 1fr;
    }
    
    .cc-smarty-suggestions {
        max-height: 250px;
    }
    
    .cc-smarty-suggestion-item {
        padding: 10px 12px;
        font-size: 13px;
    }
}


/* No Results Message */
.cc-smarty-no-results {
    padding: 20px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.cc-no-results-icon {
    font-size: 32px;
    opacity: 0.5;
}

.cc-smarty-no-results span:last-child {
    line-height: 1.5;
    max-width: 280px;
}

/* Street Header (for grouped units) */
.cc-smarty-street-header {
    padding: 8px 16px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: 1px solid #e5e7eb;
}

.cc-smarty-street-header:first-child {
    border-top: none;
}

/* Placeholder results (loading) */
.cc-placeholder-result {
    opacity: 0.5;
    pointer-events: none;
    font-style: italic;
}

.cc-loading-units {
    margin-left: 8px;
    font-size: 11px;
    color: #0073aa;
}

.cc-smarty-suggestion-item {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
.cc-sugg-left { flex: 1; }
.cc-unit-badge {
  font-weight:600;
  color:#2563eb;
  white-space:nowrap;
}


.cc-phone-wrap {
  gap: 0px !important;
}

.cc-phone-wrap.cc-phone-row select{
  width:70px !important;
  min-width:70px;
}

.cc-phone-wrap.cc-phone-row input{
  flex:1;
  min-width:0;
}

#cc-phone-country {
	border-radius: 4px 0 0 4px !important;
	padding-left: 5px !important;
}

#cc-phone {
	border-radius: 0 4px 4px 0 !important;
}
#turnstile-container {
    display: flex;
    justify-content: center;
}


/* Persistent toast spinner */
.cc-toast-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: cc-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

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

.cc-toast-persistent {
    display: flex;
    align-items: center;
}


/* ===========================
   SEARCHABLE STATE DROPDOWN
   =========================== */

.cc-state-search-wrapper {
    position: relative;
    width: 100%;
}

.cc-state-search-input {
    width: 100%;
    padding: 10px 15px;
    padding-right: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    cursor: text;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.cc-state-search-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.cc-state-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none;
}

.cc-state-dropdown.open {
    display: block;
}

.cc-state-dropdown-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s;
}

.cc-state-dropdown-item:last-child {
    border-bottom: none;
}

.cc-state-dropdown-item:hover,
.cc-state-dropdown-item.selected {
    background-color: #f0f9ff;
    color: #0073aa;
}

.cc-state-dropdown-item:active {
    background-color: #e0f2fe;
}

/* Hide original select when searchable is active */
select.cc-license-state[data-searchable-init] {
    display: none !important;
}