/* 
 * Styles for Profit Calculator Pro
 */

.clp-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    max-width: 1000px;
    margin: 20px auto;
    position: relative;
}

.clp-container {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #eee;
}

.clp-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.clp-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

.clp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .clp-grid {
        grid-template-columns: 1fr;
    }
}

.clp-field {
    display: flex;
    flex-direction: column;
}

.clp-field label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: #444;
}

.clp-field input {
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.clp-field input:focus {
    border-color: #007cba;
    outline: none;
}

.clp-field small {
    margin-top: 5px;
    font-size: 12px;
    color: #888;
}

.clp-submit-container {
    text-align: center;
}

.clp-btn-submit {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.clp-btn-submit:hover {
    background: #006799;
    transform: translateY(-2px);
}

.clp-btn-submit:active {
    transform: translateY(0);
}

/* Overlay Styles */
.clp-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.clp-overlay.active {
    display: flex;
    opacity: 1;
}

.clp-result-card {
    background: #fff;
    width: 100%;
    max-width: 850px;
    border-radius: 16px;
    padding: 40px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.clp-overlay.active .clp-result-card {
    transform: scale(1);
}

.clp-btn-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.clp-btn-close:hover {
    color: #333;
}

.clp-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.clp-result-header h3 {
    margin: 0;
    font-size: 22px;
}

.clp-badge {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.clp-badge.danger { background: #ffebee; color: #c62828; }
.clp-badge.warning { background: #fff3e0; color: #ef6c00; }
.clp-badge.success { background: #e8f5e9; color: #2e7d32; }
.clp-badge.excellent { background: #e3f2fd; color: #1565c0; }

.clp-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .clp-result-grid {
        grid-template-columns: 1fr;
    }
}

.clp-metric {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
}

.clp-metric-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.clp-metric-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.clp-analysis-box {
    background: #f0f7ff;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #007cba;
}

.clp-analysis-box strong {
    display: block;
    margin-bottom: 8px;
    color: #005a87;
}

.clp-analysis-box p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}

.clp-result-chart {
    display: flex;
    align-items: center;
    justify-content: center;
}

.clp-result-footer {
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.clp-btn-secondary {
    background: #f1f1f1;
    color: #333;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.clp-btn-secondary:hover {
    background: #e1e1e1;
}

/* Loader */
.clp-loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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