/* Cable Photos Manager Styles */

.cpm-container {
    padding-top: 36px;
}

.cpm-container h1 {
    margin-top: 0;
    font-weight: 700; 
    font-size: 38px; 
    line-height: 74%; 
    text-transform: uppercase; 
    color: #000;
}

.cpm-container h2, .cpm-container h3 {
    font-weight: 600 !important;
}

@media (max-width: 600px) {
    .cpm-container {
        padding-top: 16px;
    }
    .cpm-container h1 {
        font-weight: 600; 
        font-size: 22px; 
        line-height: 127%;
    }
    .cpm-container h2 {
        font-size: 18px !important;
    }
}


/* Формы */
.cmp-search-form,
.cpm-login-form,
.cpm-upload-form {
    max-width: 500px;
    margin: 0 auto;
}

.cmp-search-form-description {
	margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="file"],
.form-group select,
.form-group input[type="number"],
.form-group input[type="email"] {
    width: 100%;
	/* 	padding: 12px; 
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px; using global styles */
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group select:focus,
.form-group input[type="number"]:focus,
.form-group input[type="email"]:focus {
    border-color: #000000;
    outline: none;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

/* Кнопки */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
    text-align: center;
	white-space: nowrap;
}

.btn-primary {
    background-color: #000000;
    color: white;
}

.btn-primary:hover {
    background-color: #D1A155;
    color: white;
}

.btn-secondary {
    background-color: #2E2F30;
    color: white;
    border-radius: 0px;
    font-size: 16px;
}

.btn-secondary:hover {
    background-color: #545b62;
    color: white;
}

.btn-secondary:focus {
    color: #FFFFFF;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* Сообщения */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin: 15px 0;
    border: 1px solid #f5c6cb;
}

.success-message {
    background-color: #d1edff;
    color: #0c5460;
    padding: 12px;
    border-radius: 4px;
    margin: 15px 0;
    border: 1px solid #bee5eb;
}

/* Результаты поиска */
.cpm-result {
    margin-top: 30px;
    display: flex;
    flex-direction: row;
    align-items: left;
    justify-content: start;
}

@media (max-width: 640px) {
    .cpm-result {
        flex-direction: column;
    }
}

.cpm-photo-container {
    margin-bottom: 30px;
}

.cpm-cable-photo {
    max-width: 400px;
    max-height: 300px;
    cursor: pointer;
    transition: transform 0.3s;
    display: inline-block;
}

.cpm-cable-photo:hover {
    transform: scale(1.05);
}

.photo-hint {
    margin-top: 10px;
    color: #666;
    font-style: italic;
}

/* Информация о кабеле */
.cpm-info {
    border-radius: 8px;
    text-align: left;
    margin-left: 56px;
    margin-bottom: 24px;
}

@media (max-width: 640px) {
    .cpm-info {
        margin-left: 0px;
    }
}

.cpm-info h2, .cpm-photo-container h2, .cpm-cable-parameters h2 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #000;
    font-weight: 500;
    font-size: 28px;
    margin-bottom: 16px;
    font-style: medium;
    text-transform: uppercase;
}

.cpm-cable-parameters h3, .test-grid h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #000;
    font-weight: 500;
    font-size: 15px;
    font-style: medium;
    text-transform: uppercase;
}

.info-row {
    border-bottom: 1px solid #eee;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row strong {
    display: inline-block;
    width: 150px;
    color: #555;
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
}

.info-row span {
    font-weight: 600;
    font-style: normal;
    font-size: 20px;
}

/* Actions */
.cpm-actions {
    margin-top: 16px;
}

/* Header with logout button */
.cpm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.cpm-header h1 {
    margin: 0;
    text-align: left;
}

/* Adaptability */
@media (max-width: 600px) {
    
    .cpm-verify-page,
    .cpm-upload-page {
        padding: 20px;
    }
    
    .cpm-cable-photo {
        max-width: 100%;
        height: auto;
    }
    
    .info-row strong {
        width: auto;
    }
    
    .cpm-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .cpm-header h1 {
        text-align: center;
    }
}

/* Custom image modal (replacement for Lightbox) */
.cpm-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(3px);
}

.cpm-modal-content {
    position: relative;
    margin: 5% auto;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.cpm-modal-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    overflow: clip;
    display: inline;
}

.cpm-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    transition: background-color 0.3s;
}

.cpm-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.cpm-modal-caption {
    color: white;
    margin-top: 15px;
    font-size: 16px;
    padding: 10px;
    display: block;
}

/* Prevent scroll when modal is open */
body.cpm-modal-open {
    overflow: hidden;
}

.test-grid table th {
    width: 50% !important;
}

.test-grid table td {
    line-height: 134%; 
    padding: 8px 0px; 
    font-size: 16px;
}

/* Мобильная адаптация модального окна */
@media (max-width: 768px) {
    .cpm-modal-content {
        margin: 10% auto;
        max-width: 95%;
    }
    
    .cpm-modal-image {
        max-height: 70vh;
    }
    
    .cpm-modal-close {
        top: -30px;
        font-size: 24px;
        width: 30px;
        height: 30px;
        line-height: 30px;
    }
    
    .cpm-modal-caption {
        font-size: 14px;
        margin-top: 10px;
    }
} 

.elementor-menu-cart__container {
    display: none !important;
}

.test-grid {
    display: flex;
    flex-direction: row;
    align-items: left;
    width: 100%;
    justify-content: space-between;
}

.first-column{
    width: 500px;
}

.second-column {
    width: 560px;
}

.right-align {
    text-align: right !important;
}

.test-grid table {
    width: 100%;
    border-collapse: collapse;
}
.test-grid table th {
    color: #5F5F5F;
    font-weight: 400;
    font-size: 15px;
    font-style: normal;
    text-align: left;
}
.test-grid table th, .test-grid table td {
    border-bottom: 1px solid #78787824;
    padding: 4px;
    text-align: left;
}
.test-grid table td {
    font-weight: 400;
    font-size: 18px;
    font-style: normal;
}

@media (max-width: 1100px) {
    .test-grid {
        flex-direction: column;
    }
    .first-column, .second-column {
        width: 100%;
    }
}

