/* diary_calc.css */
#diaryCalcModal .calc-modal-content {
    max-width: 950px;
    border-radius: 8px;
    padding: 20px 30px;
    background: #eaeaea;
    /* Light grey background matching screenshot */
    color: #000;
}

.diary-calc-header {
    margin-bottom: 15px;
}

.diary-calc-header h2 {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

/* Top Block */
.diary-calc-top-block {
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.diary-calc-top-section h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: normal;
}

/* Main Grid */
.diary-calc-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
}

/* Left Column Box */
.diary-calc-left-box {
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.diary-calc-left-box h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: normal;
}

/* Right Column Boxes */
.diary-calc-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Circulation Control */
.qty-control-v2 {
    display: inline-flex;
    align-items: center;
    background: #f8f8f8;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ccc;
}

.qty-control-v2 button {
    background: #999;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.qty-control-v2 input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-size: 16px;
    background: #f8f8f8;
}

/* Application Sizes */
.size-options-grid {
    display: flex;
    gap: 75px;
}

.size-card {
    background: #f0f0f0;
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: 2px solid transparent;
}

.size-card.active {
    background: #e6e6e6;
}

.size-card input[type="radio"] {
    margin: 0;
}

.size-dummy-img {
    width: 30px;
    height: 40px;
    border: 1px solid #333;
    border-radius: 4px;
    position: relative;
    background: #fff;
}

.size-dummy-img::before {
    /* spiral binding simulation */
    content: '';
    position: absolute;
    left: 2px;
    top: 3px;
    bottom: 3px;
    width: 3px;
    border-left: 2px dashed #333;
}

.size-dummy-green {
    background: var(--primary);
    position: absolute;
    border-radius: 2px;
}

.size-sm .size-dummy-green {
    width: 10px;
    height: 10px;
    top: 6px;
    left: 10px;
}

.size-md .size-dummy-green {
    width: 14px;
    height: 20px;
    top: 10px;
    left: 8px;
}

.size-lg .size-dummy-green {
    width: 18px;
    height: 32px;
    top: 4px;
    left: 7px;
}

/* Application Types */
.type-options-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.type-card {
    background: #f0f0f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border: 2px solid transparent;
    overflow: hidden;
    height: 50px;
}

.type-card.active {
    background: #e6e6e6;
}

.type-img {
    width: 140px;
    height: 100%;
    background: #333;
    /* Placeholder for image */
    flex-shrink: 0;
}

.type-name {
    padding: 0 15px;
    font-size: 18px;
    flex-grow: 1;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: var(--primary);
    color: white;
    font-size: 12px;
    border-radius: 50%;
    margin-left: 5px;
    font-weight: bold;
}

/* Embossing Parameters */
.embossing-params {
    background: #f8f8f8;
    border: 1px solid #ccc;
    border-collapse: collapse;
    width: 100%;
    margin-top: 15px;
}

.embossing-params th {
    background: #f0f0f0;
    border: 1px solid #ccc;
    padding: 10px;
    font-weight: normal;
    text-align: center;
    font-size: 16px;
}

.embossing-params td {
    border: 1px solid #ccc;
    padding: 12px;
    vertical-align: middle;
}

.param-radio-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    cursor: pointer;
}

.param-radio-group input {
    margin: 0;
}

.param-input-group {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.param-input-group input {
    width: 50px;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
}

/* Right side panels */
.details-panel {
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.details-panel h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 10px;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-table th {
    background: #f0f0f0;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: normal;
    text-align: left;
    color: #333;
}

.details-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    font-weight: bold;
}

.details-table td:last-child,
.details-table th:last-child {
    text-align: right;
}

.details-placeholder-box {
    border: 1px solid #eee;
    border-radius: 4px;
    height: 200px;
    margin-top: 20px;
}

.total-panel {
    background: #fff;
    border-radius: 6px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.total-panel h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: bold;
}

.total-price {
    font-size: 32px;
    font-weight: bold;
    color: #4A7A6A;
    /* Similar to screenshot green */
}

/* Footer Buttons */
.diary-modal-footer {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.diary-modal-footer button {
    flex: 1;
    max-width: 250px;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-contact {
    background: var(--primary);
}

.btn-cart {
    background: #ff7020;
}

.btn-order {
    background: #ff7020;
}

.btn-contact:hover {
    background: var(--primary-dark);
}

.btn-cart:hover {
    background: #e65c00;
}

.btn-order:hover {
    background: #e65c00;
}
/* Мобильная версия */
@media (max-width: 768px) {
    #diaryCalcModal .calc-modal-content { padding: 16px; }
    .diary-calc-header h2 { font-size: var(--fs-h3); }
    .diary-calc-top-block { flex-direction: column; gap: 16px; padding: 12px; }
    .diary-calc-grid { grid-template-columns: 1fr; }
    .diary-calc-left-box { padding: 12px; }
}
