/**
 * KEENAN Product Configurator Frontend Styles
 */

/* Global Styles */
body {
    font-family: 'Arial', sans-serif;
}

.kpc-configurator-container {
    position: relative;
    max-width: 100%;
    padding: 0;
    background-color: #f8f9fa;
}

/* Step Indicator Header */
.kpc-steps-header {
    background-color: #333;
    color: white;
    margin: 0;
    text-align: center;
}

.kpc-step-tab {
    padding: 8px 0;
    cursor: pointer;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.kpc-step-tab:last-child {
    border-right: none;
}

.kpc-step-inner {
    position: relative;
    padding: 10px;
    font-size: 14px;
}

.kpc-step-inner.active {
    background-color: #00692F;
}

/* Step Content */
.kpc-step-content {
    display: none;
    padding: 30px 0;
    background-color: #f0f0f0;
    min-height: calc(100vh - 120px);
}

.kpc-step-content.active {
    display: block;
}

.kpc-step-content h2 {
    color: #00692F;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 20px;
}

/* Country Selection */
.kpc-country-heading {
    color: #27603D;
    font-size: 2.5rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.kpc-world-map {
    max-width: 600px;
    margin: 0 auto;
}

.kpc-countries-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.kpc-country-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.kpc-country-item-link:hover {
    transform: translateY(-5px);
    text-decoration: none;
    color: inherit;
}

.kpc-country-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.kpc-country-item.selected,
.kpc-country-item:hover {
    box-shadow: 0 8px 16px rgba(39, 96, 61, 0.2);
}

.kpc-country-flag {
    width: 60px;
    height: 40px;
    object-fit: cover;
}

.kpc-country-name {
    font-size: 1.1rem;
    font-weight: 500;
}

.kpc-request-country-link {
    color: #27603D;
    text-decoration: underline;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s;
}

.kpc-request-country-link:hover {
    color: #1a432a;
    text-decoration: underline;
}

/* Machine Selection */
.kpc-machines-grid .col-md-3 {
    margin-bottom: 20px;
}

.kpc-machine-item {
    border: 2px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.kpc-machine-item:hover {
    border-color: #00692F;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.kpc-machine-item.selected {
    border-color: #00692F;
}

.kpc-machine-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.kpc-machine-image img {
    max-width: 100%;
}

.kpc-machine-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.kpc-machine-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
    text-align: center;
}

.kpc-machine-model,
.kpc-machine-size {
    font-size: 14px;
    color: #555;
    margin-bottom: 5px;
    text-align: center;
}

.kpc-machine-price {
    color: #00692F;
    font-weight: bold;
    font-size: 16px;
    margin-top: auto;
    text-align: center;
}

/* Machine Options */
.kpc-selected-machine-display {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpc-selected-machine-display img {
    max-width: 100%;
    height: auto;
}

.kpc-extras-container {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.kpc-extras-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.kpc-category-item {
    padding: 8px 15px;
    background-color: #f0f0f0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 14px;
}

.kpc-category-item:hover {
    background-color: #e0e0e0;
}

.kpc-category-item.active {
    background-color: #00692F;
    color: #fff;
}

.kpc-extras-group-title {
    font-weight: bold;
    padding: 10px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.kpc-extra-item {
    justify-content: space-between;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    cursor: pointer;
}

.kpc-extra-item:hover {
    background-color: #f8f8f8;
}

.kpc-extra-item.selected {
    border-color: #00692F;
    background-color: #f0f8f0;
}

.kpc-extra-info {
    flex: 1;
}

.kpc-extra-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.kpc-extra-price {
    font-weight: bold;
    color: #00692F;
    min-width: 80px;
    text-align: right;
}

/* Configuration Summary */
.kpc-summary-container {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.kpc-summary-machine-image {
    background-color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    overflow: hidden;
}

.kpc-summary-machine-image img {
    max-width: 100%;
    height: auto;
}

.kpc-summary-machine-title {
    font-weight: bold;
}

.kpc-spec-item {
    margin-bottom: 15px;
}

.kpc-spec-label {
    font-size: 12px;
    color: #777;
    text-transform: uppercase;
}

.kpc-spec-value {
    font-weight: bold;
    font-size: 16px;
}

.kpc-summary-section {
    padding-bottom: 15px;
}

.kpc-summary-section h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.kpc-features-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kpc-features-list li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.kpc-price-total {
    font-size: 24px;
    font-weight: bold;
    color: #00692F;
    padding: 10px 0;
    border-top: 2px solid #00692F;
    margin-top: 15px;
}

/* Buttons */
.btn-success {
    background-color: #00692F;
    border-color: #00692F;
}

.btn-success:hover, 
.btn-success:active, 
.btn-success:focus {
    background-color: #004d20 !important;
    border-color: #004d20 !important;
}

.btn-outline-success {
    color: #00692F;
    border-color: #00692F;
}

.btn-outline-success:hover {
    background-color: #00692F;
    border-color: #00692F;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .kpc-step-inner {
        font-size: 12px;
        padding: 8px 2px;
    }
    
    .kpc-selected-machine-display {
        margin-bottom: 20px;
    }
}

/* Fix for Bootstrap integration */
.container-fluid.p-0 {
    padding: 0 !important;
} 

/* Modal Styles */
.kpc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}

.kpc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
}

.kpc-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.kpc-modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    padding: 0;
    width: 30px;
    height: 30px;
}

.kpc-modal-close:hover {
    color: #333;
}

.kpc-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.kpc-modal-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: #00692F;
}

/* Modal Message Styles */
.kpc-modal-message {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

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

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

.kpc-modal-message.info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.kpc-modal-message-icon {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Modal Welcome Style */
.kpc-modal-welcome {
    text-align: left;
}

.kpc-modal-welcome p {
    margin-bottom: 15px;
    font-size: 16px;
}

.kpc-modal-welcome ol {
    margin-left: 20px;
    line-height: 1.6;
}

/* Modal Machine/Extra Details */
.kpc-modal-machine-details,
.kpc-modal-extra-details {
    display: flex;
    flex-direction: column;
}

.kpc-modal-machine-image,
.kpc-modal-extra-image {
    text-align: center;
    margin-bottom: 15px;
}

.kpc-modal-machine-image img,
.kpc-modal-extra-image img {
    max-width: 100%;
    max-height: 300px;
    height: auto;
}

.kpc-modal-machine-description,
.kpc-modal-extra-description {
    line-height: 1.5;
    margin-bottom: 15px;
}

.kpc-modal-extra-price {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

/* Modal PDF Style */
.kpc-modal-pdf {
    width: 100%;
}

.kpc-modal-pdf iframe {
    border: 1px solid #ddd;
    margin-bottom: 15px;
}

/* Modal Saved Style */
.kpc-modal-saved {
    text-align: center;
    padding: 20px 0;
}

.kpc-modal-saved p {
    margin-bottom: 15px;
    font-size: 16px;
}

.kpc-modal-saved strong {
    font-size: 1.2rem;
    color: #333;
}

/* Loading */
.kpc-loading {
    text-align: center;
    padding: 30px 0;
    color: #666;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .kpc-modal {
        max-width: 95%;
    }
    
    .kpc-modal-header {
        padding: 10px 15px;
    }
    
    .kpc-modal-body {
        padding: 15px;
    }
    
    .kpc-modal-title {
        font-size: 1.1rem;
    }
}

/* Animation for modal */
@keyframes kpcFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.kpc-modal-overlay.fade-in {
    animation: kpcFadeIn 0.3s ease-in-out forwards;
}

.kpc-modal-overlay.fade-out {
    animation: kpcFadeOut 0.3s ease-in-out forwards;
}

/* Country Selection Page */
.kpc-country-selection-page {
    padding: 50px 0;
    background-color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kpc-country-selection-page .kpc-world-map {
    max-width: 600px;
    margin: 0 auto 40px;
    text-align: center;
}

.kpc-country-selection-page .kpc-country-heading {
    color: #27603D;
    font-size: 2.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 3rem;
    text-align: center;
}

.kpc-country-selection-page .kpc-countries-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

@media screen and (max-width: 768px) {
    .kpc-country-selection-page .kpc-country-heading {
        font-size: 2rem;
    }
} 