/**
 * Percentage Calculator - Complete Style
 * Primary: #0e7e94 | Secondary: #0a6475 | Accent: #14b8c4
 */

.apc-date-calculator {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.apc-container {
    background: #ffffff;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #dbe4ea;
}

.apc-header {
    text-align: center;
    margin-bottom: 32px;
}

.apc-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #0b1120;
    margin: 0 0 8px 0;
}

.apc-header p {
    color: #4b5563;
    font-size: 0.9rem;
    margin: 0;
}

.apc-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
}

.apc-tab-btn {
    background: none;
    border: none;
    padding: 8px 18px;
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: 10px;
    cursor: pointer;
    color: #4b5563;
    transition: all 0.2s;
}

.apc-tab-btn:hover {
    background: #e8f2f4;
    color: #0e7e94;
}

.apc-tab-btn.active {
    background: #0e7e94;
    color: #ffffff;
}

.apc-tab-content {
    display: none;
}

.apc-tab-content.active {
    display: block;
}

.apc-card {
    background: #ffffff;
    border: 1px solid #e8f2f4;
    border-radius: 10px;
    margin-bottom: 24px;
    overflow: hidden;
}

.apc-card-header {
    background: #0b1120;
    padding: 16px 20px;
    border-bottom: 1px solid #e8f2f4;
}

.apc-card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.apc-card-header p {
    font-size: 0.8rem;
    color: #cbd5e1;
    margin: 0;
}

.apc-card-body {
    padding: 20px;
}

.apc-input-group {
    margin-bottom: 20px;
}

.apc-input-group label {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 6px;
}

.apc-input,
.apc-select {
    width: 100%;
    padding: 0 14px;
    line-height: 40px;
    border: 1px solid #dbe4ea;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: 'Manrope', sans-serif;
    background: #ffffff;
    transition: all 0.2s;
}

.apc-select {
    padding: 0 32px 0 14px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.apc-input:focus,
.apc-select:focus {
    outline: none;
    border-color: #0a6475;
    box-shadow: 0 0 0 3px rgba(14, 126, 148, 0.1);
}

.apc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: 'Manrope', sans-serif;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.apc-btn-primary {
    background: #0e7e94;
    color: #ffffff;
    border-color: #0e7e94;
}

.apc-btn-primary:hover {
    background: #0a6475;
    transform: translateY(-1px);
}

.apc-btn-secondary {
    background: #e8f2f4;
    color: #0e7e94;
    border-color: #e8f2f4;
}

.apc-btn-secondary:hover {
    background: #0e7e94;
    color: #ffffff;
    border-color: #0e7e94;
}

.apc-actions {
    text-align: right;
    margin: 16px 0 0;
}

.apc-result-wrapper {
    background: #e8f2f4;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0 0;
}

.apc-result {
    display: block;
    width: 100%;
    font-size: 2rem;
    font-weight: 700;
    color: #0e7e94;
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #cbd5e1;
    word-break: break-word;
}

.apc-explanation {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.5;
    /* no extra border – only the line above from .apc-result */
}

.apc-ms-operations label {
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.apc-ms-list {
    margin-bottom: 12px;
}

.apc-ms-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.apc-ms-row select,
.apc-ms-row input {
    flex: 1;
    padding: 0 12px;
    line-height: 38px;
    border-radius: 10px;
    border: 1px solid #dbe4ea;
}

.apc-ms-row button.apc-ms-del {
    background: #fee2e2;
    border: none;
    color: #b91c1c;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.apc-ms-add {
    margin-top: 8px;
}

@media (max-width: 600px) {
    .apc-container {
        padding: 16px;
    }
    .apc-result {
        font-size: 1.5rem;
    }
    .apc-tab-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    .apc-ms-row {
        flex-direction: column;
        align-items: stretch;
    }
    .apc-ms-row button.apc-ms-del {
        align-self: flex-end;
    }
    .apc-actions {
        text-align: center;
    }
    .apc-btn {
        width: 100%;
        justify-content: center;
    }
}