/* Service Estimator Pro - Public Styles */

.sep-estimator-widget {
    max-width: 1200px;
    margin: 30px auto;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Two Column Layout */
.sep-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.sep-left-column {
    padding-right: 15px;
}

.sep-right-column {
    padding-left: 15px;
    border-left: 2px solid #e0e0e0;
}

/* Dark theme */
.sep-estimator-widget.sep-theme-dark {
    background: #1a1a1a;
    border-color: #333;
    color: #e0e0e0;
}

/* Header */
.sep-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--sep-primary-color, #4CAF50);
}

.sep-title {
    font-size: 28px;
    margin: 0 0 10px 0;
    color: var(--sep-primary-color, #4CAF50);
}

.sep-description {
    font-size: 16px;
    color: #666;
    margin: 10px 0;
}

.sep-theme-dark .sep-description {
    color: #999;
}

.sep-company {
    font-size: 14px;
    font-weight: 600;
    color: #888;
    margin: 5px 0 0 0;
}

/* Services */
.sep-services h3 {
    font-size: 20px;
    margin: 0 0 20px 0;
}

.sep-category {
    margin-bottom: 25px;
}

.sep-category-toggle {
    width: 100%;
    background: color-mix(in srgb, var(--sep-primary-color, #4CAF50) 15%, white);
    color: #333;
    border: none;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s ease;
    margin-bottom: 12px;
    outline: none;
}

.sep-category-toggle:hover,
.sep-category-toggle:focus,
.sep-category-toggle:active {
    background: color-mix(in srgb, var(--sep-primary-color, #4CAF50) 20%, white);
    color: #333;
    outline: none;
    border: none;
}

.sep-category-toggle.sep-category-open {
    background: var(--sep-primary-color, #4CAF50);
    color: white;
}

.sep-category-toggle.sep-category-open:hover,
.sep-category-toggle.sep-category-open:focus,
.sep-category-toggle.sep-category-open:active {
    background: var(--sep-primary-color, #4CAF50);
    color: white;
    outline: none;
    border: none;
}

.sep-category-icon {
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
}

.sep-category-title-text {
    flex: 1;
}

.sep-category-count {
    opacity: 0.8;
    font-size: 14px;
}

.sep-category-services {
    padding-left: 0;
}

.sep-theme-dark .sep-category-toggle {
    background: color-mix(in srgb, var(--sep-primary-color, #4CAF50) 20%, #1a1a1a);
    color: #e0e0e0;
}

.sep-theme-dark .sep-category-toggle:hover,
.sep-theme-dark .sep-category-toggle:focus,
.sep-theme-dark .sep-category-toggle:active {
    background: color-mix(in srgb, var(--sep-primary-color, #4CAF50) 25%, #1a1a1a);
    color: #e0e0e0;
}

.sep-theme-dark .sep-category-toggle.sep-category-open,
.sep-theme-dark .sep-category-toggle.sep-category-open:hover,
.sep-theme-dark .sep-category-toggle.sep-category-open:focus,
.sep-theme-dark .sep-category-toggle.sep-category-open:active {
    background: var(--sep-primary-color, #4CAF50);
    color: white;
}

.sep-category-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--sep-primary-color, #4CAF50);
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--sep-primary-color, #4CAF50);
}

.sep-theme-dark .sep-category-title {
    color: var(--sep-primary-color, #4CAF50);
}

.sep-service-item {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 15px;
    padding: 15px;
    transition: all 0.3s ease;
}

.sep-theme-dark .sep-service-item {
    background: #2a2a2a;
    border-color: #444;
}

.sep-service-item:hover {
    border-color: var(--sep-primary-color, #4CAF50);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Active state when service is selected */
.sep-service-item.sep-service-active {
    border-color: var(--sep-primary-color, #4CAF50);
    background: #f0f9f0;
}

.sep-theme-dark .sep-service-item.sep-service-active {
    background: #1a3a1a;
    border-color: var(--sep-primary-color, #4CAF50);
}

.sep-service-header {
    display: flex;
    align-items: center;
}

.sep-service-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    padding-right: 30px;
    gap: 12px;
}

.sep-service-checkbox {
    position: absolute;
    top: 0;
    right: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid #ddd;
    border-radius: 50%;
    background: white;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin: 0;
    outline: none !important;
    box-shadow: none !important;
}

.sep-service-checkbox:hover {
    border-color: #ddd;
    outline: none !important;
    box-shadow: none !important;
}

.sep-service-checkbox:focus {
    border-color: #ddd;
    outline: none !important;
    box-shadow: none !important;
}

.sep-service-checkbox:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.sep-service-checkbox:active {
    outline: none !important;
    box-shadow: none !important;
}

.sep-service-checkbox:checked {
    background: var(--sep-primary-color, #4CAF50);
    border-color: var(--sep-primary-color, #4CAF50);
    outline: none !important;
    box-shadow: none !important;
}

.sep-service-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

.sep-service-checkbox:checked:hover,
.sep-service-checkbox:checked:focus,
.sep-service-checkbox:checked:active {
    outline: none !important;
    box-shadow: none !important;
}

.sep-theme-dark .sep-service-checkbox {
    background: #2a2a2a;
    border-color: #555;
}

.sep-theme-dark .sep-service-checkbox:checked {
    background: var(--sep-primary-color, #4CAF50);
    border-color: var(--sep-primary-color, #4CAF50);
}

.sep-theme-dark .sep-service-checkbox:checked::after {
    color: white;
}

.sep-service-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: color-mix(in srgb, var(--sep-primary-color, #4CAF50) 15%, transparent);
    transition: all 0.3s ease;
}

.sep-service-icon .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: var(--sep-primary-color, #4CAF50);
    transition: color 0.3s ease;
}

.sep-service-item.sep-service-active .sep-service-icon {
    background: var(--sep-primary-color, #4CAF50);
}

.sep-service-item.sep-service-active .sep-service-icon .dashicons {
    color: white;
}

.sep-service-name {
    flex: 1;
}

.sep-service-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sep-service-description {
    font-size: 13px;
    color: #666;
    font-weight: 400;
    margin-top: 3px;
    line-height: 1.4;
}

.sep-theme-dark .sep-service-description {
    color: #999;
}

/* Service inputs */
.sep-service-inputs {
    margin-top: 15px;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.sep-service-inputs.sep-hidden {
    display: none !important;
}

.sep-theme-dark .sep-service-inputs {
    background: #2a2a2a;
    border-color: #444;
}

.sep-input-group {
    margin-bottom: 15px;
}

.sep-input-group:last-child {
    margin-bottom: 0;
}

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

.sep-theme-dark .sep-input-group label {
    color: #e0e0e0;
}

.sep-flat-notice {
    margin: 0;
    padding: 12px;
    background: var(--sep-primary-color, #4CAF50);
    color: white;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

.sep-input-field {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    background: #fff;
    outline: none;
}

.sep-input-field:hover {
    border-color: #ddd;
}

.sep-input-field:focus {
    border-color: var(--sep-primary-color, #4CAF50);
    outline: none;
}

.sep-input-field:active {
    border-color: var(--sep-primary-color, #4CAF50);
    outline: none;
}

.sep-theme-dark .sep-input-field {
    background: #333;
    border-color: #555;
    color: #e0e0e0;
}

.sep-theme-dark .sep-input-field:hover {
    border-color: #555;
}

.sep-theme-dark .sep-input-field:focus {
    border-color: var(--sep-primary-color, #4CAF50);
}

.sep-theme-dark .sep-input-field:active {
    border-color: var(--sep-primary-color, #4CAF50);
}

/* Select dropdowns */
.sep-input-field[type="select"],
select.sep-input-field {
    cursor: pointer;
    appearance: none;
    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='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Estimate display */
.sep-estimate-display {
    background: white;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.sep-theme-dark .sep-estimate-display {
    background: #2a2a2a;
    border-color: #444;
}

.sep-estimate-display h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    text-align: left;
}

.sep-theme-dark .sep-estimate-display h3 {
    color: #e0e0e0;
}

.sep-price-range {
    font-size: 32px;
    font-weight: bold;
    margin: 10px 0 20px 0;
    color: var(--sep-primary-color, #4CAF50);
    text-align: left;
}

.sep-estimate-lines {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sep-estimate-lines li {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #333;
}

.sep-theme-dark .sep-estimate-lines li {
    border-bottom-color: #444;
    color: #e0e0e0;
}

.sep-estimate-lines li:last-child {
    border-bottom: none;
}

.sep-estimate-line-service {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.sep-estimate-line-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sep-estimate-line-icon .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #666;
}

.sep-theme-dark .sep-estimate-line-icon .dashicons {
    color: #999;
}

.sep-estimate-line-price {
    font-weight: 600;
    color: #333;
}

.sep-theme-dark .sep-estimate-line-price {
    color: #e0e0e0;
}

/* Contact form */
.sep-contact-form h3 {
    font-size: 20px;
    margin: 0 0 10px 0;
}

.sep-form-description {
    color: #666;
    font-size: 14px;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.sep-theme-dark .sep-form-description {
    color: #999;
}

.sep-form-row {
    margin-bottom: 20px;
}

.sep-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

.sep-required {
    color: #d32f2f;
}

.sep-form input[type="text"],
.sep-form input[type="email"],
.sep-form input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.sep-form input:focus {
    outline: none;
    border-color: var(--sep-primary-color, #4CAF50);
}

.sep-theme-dark .sep-form input {
    background: #333;
    border-color: #555;
    color: #e0e0e0;
}

.sep-submit-btn {
    width: 100%;
    padding: 15px;
    background: var(--sep-primary-color, #4CAF50);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    outline: none;
}

.sep-submit-btn:hover {
    background: color-mix(in srgb, var(--sep-primary-color, #4CAF50) 90%, black);
    border: none;
    outline: none;
}

.sep-submit-btn:focus {
    background: var(--sep-primary-color, #4CAF50);
    border: none;
    outline: none;
}

.sep-submit-btn:active {
    background: color-mix(in srgb, var(--sep-primary-color, #4CAF50) 90%, black);
    border: none;
    outline: none;
}

.sep-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    border: none;
    outline: none;
}

/* Form messages */
.sep-form-message {
    padding: 12px;
    border-radius: 4px;
    margin-top: 15px;
    text-align: center;
}

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

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

/* Success message */
.sep-success-message {
    text-align: center;
    padding: 40px 20px;
}

.sep-success-icon {
    width: 80px;
    height: 80px;
    background: var(--sep-primary-color, #4CAF50);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
}

.sep-success-message h3 {
    font-size: 28px;
    margin: 0 0 15px 0;
    color: var(--sep-primary-color, #4CAF50);
}

.sep-success-message p {
    font-size: 16px;
    color: #666;
}

.sep-theme-dark .sep-success-message p {
    color: #999;
}

.sep-success-confirmation {
    font-size: 16px;
    color: #666;
    margin: 0 0 30px 0;
    line-height: 1.6;
    padding: 0 20px;
}

.sep-theme-dark .sep-success-confirmation {
    color: #999;
}

.sep-success-text {
    font-size: 16px;
    color: #666;
    margin: 0 0 30px 0;
    line-height: 1.6;
}

.sep-theme-dark .sep-success-text {
    color: #999;
}

.sep-success-estimate {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    margin: 20px auto;
    max-width: 500px;
    text-align: left;
}

.sep-theme-dark .sep-success-estimate {
    background: #2a2a2a;
    border-color: #444;
}

.sep-success-estimate h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

.sep-theme-dark .sep-success-estimate h4 {
    color: #e0e0e0;
}

.sep-success-services-title {
    margin: 25px 0 15px 0 !important;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.sep-theme-dark .sep-success-services-title {
    border-top-color: #444;
}

.sep-success-price {
    font-size: 32px;
    font-weight: bold;
    color: var(--sep-primary-color, #4CAF50);
    margin: 10px 0 20px 0;
}

.sep-success-services {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sep-success-services li {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sep-theme-dark .sep-success-services li {
    border-bottom-color: #444;
}

.sep-success-services li:last-child {
    border-bottom: none;
}

.sep-success-service-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sep-success-service-icon .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #666;
}

.sep-theme-dark .sep-success-service-icon .dashicons {
    color: #999;
}

.sep-success-service-name {
    flex: 1;
    color: #333;
}

.sep-theme-dark .sep-success-service-name {
    color: #e0e0e0;
}

.sep-success-service-desc {
    color: #666;
    font-size: 14px;
}

.sep-theme-dark .sep-success-service-desc {
    color: #999;
}

.sep-success-service-price {
    font-weight: 600;
    color: #333;
}

.sep-theme-dark .sep-success-service-price {
    color: #e0e0e0;
}
}

.sep-theme-dark .sep-success-services li {
    border-bottom-color: #444;
    color: #e0e0e0;
}

.sep-success-services li:last-child {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
    .sep-estimator-widget {
        padding: 20px;
        margin: 15px;
    }
    
    /* Stack columns on mobile */
    .sep-content-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sep-left-column,
    .sep-right-column {
        padding: 0;
        border: none;
    }
    
    .sep-right-column {
        border-top: 2px solid #e0e0e0;
        padding-top: 20px;
    }
    
    .sep-title {
        font-size: 24px;
    }
    
    .sep-price-range {
        font-size: 24px;
    }
    
    .sep-service-label {
        font-size: 14px;
    }
}

/* Loading spinner */
.sep-btn-loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: sep-spin 1s linear infinite;
}

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

/* Icon images from URLs */
.sep-service-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.sep-success-service-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.sep-estimate-line-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* Avalanche Link */
.sep-avalanche-link {
    border-top: 1px solid #e0e0e0;
}

.sep-avalanche-link a {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: color 0.2s ease;
}

.sep-avalanche-link a:hover {
    color: #333;
    text-decoration: underline;
}

.sep-theme-dark .sep-avalanche-link {
    border-top-color: #444;
}

.sep-theme-dark .sep-avalanche-link a {
    color: #999;
}

.sep-theme-dark .sep-avalanche-link a:hover {
    color: #ccc;
}
