h1 {
	font-family:Verdana, sans-serif;
	font-size: 13px;
	padding-bottom: 6px;
	text-align: left;
}

p {
	font-family:Verdana, sans-serif;
	font-size: 12px;
	text-align: left;
}

a {
	color: #00247D;
	text-decoration: underline;
}

a:visited {
	color: #00247D;
	text-decoration: underline;
}

a:focus, a:hover, a:active {
	color: #F39800;
	text-decoration: underline;
}

pre {
	text-align: left;
}


.promptMessage {
	margin-top: 0;
}

.selectOptions {
	margin-bottom: 0;
}

.select2-result-repository__logo img {
	margin-top: 6px;
}

.select2-result-repository__title {
	font-size: 12px;
}

.box
{
	width: 600px;
	text-align: center;
	background-color: #FFFFFF;
	box-shadow: 1px 1px 8px #999999;
	border-radius: 13px;
	-webkit-box-shadow: 1px 1px 8px #999999;
	-webkit-border-radius: 13px;
	-moz-box-shadow: 1px 1px 8px #999999;
	-moz-border-radius: 13px;
	padding: 10px 24px 10px 24px;
}


/* IE 6 hack */
* html .box { border: 2px #969696 solid; }

/* IE 7 hack */
*+html .box { border: 2px #969696 solid; }


/* IE 8 hack */
@media \0screen {
	.box { border: 2px #969696 solid; }
}

.menu {
	width: 100%;
	padding-left: 2px;
	margin-top: 10px;
	margin-left: 0;
	float: left;
	background: url("https://ds.g-riseon.or.kr//images/dual_line.png") repeat-x scroll 0 100% transparent;
	font-family: Verdana, sans-serif;
	font-size: 12px;
	line-height: 45px;
}

.menu li {
	float: left;
	list-style:none;
	line-height:35px;
	margin-right:10px;
}

.menu li.last {
	background: url("https://ds.g-riseon.or.kr//images/separator.png") no-repeat scroll left center transparent;
	padding-left: 8px;
	float: left;
	list-style:none;
}

.serviceName {
	font-weight: bold;
}

.hostName {
	font-weight: bold;
}


#container, .container {
	position: absolute;
	left: 50%;
	top: 50%;
	margin-left: -320px;
	margin-top: -200px;
}

#content, .content {
	width: 98%;
}

#header {
	width: 100%;
	display: inline-block;
	text-align: left;
}

#federationLogo {
	border: 0;
	float: left;
}

#organisationLogo
{
	border: 0;
	float: right;
}

#userInputArea, .userInputArea {
	margin-left: auto;
	margin-right: auto;
	background-color: #fafafa;
	border-color: #c0c0c0;
	border-width: 1px;
	border-style: solid;
	padding: 20px;
}

#userIdPSelection, .userIdPSelection {
	width: 460px;
	font-size: 12px;
}

input[name="Select"]{
	color: #fff;
	background-color: #0175E4;
	border-color: #007bff;
	border-radius: 4px;
	border-style: none;
}

input[name="Select"]:hover {
    background-color: #0069d9;
	border-color: #0062cc;
}

input[name="Select"]:active {
    background-color: #0062cc;
	border-color: #005cbf;
}

/* Device specific styles */
@media only screen and (max-device-width: 720px){
	.box {
		width: auto;
		box-shadow: none;
		border-radius: 0;
		-webkit-box-shadow: none;
		-webkit-border-radius: 0;
		-moz-box-shadow: none;
		-moz-border-radius: 0;
		padding: 0;
	}

	#content, .content {
		width: 96%;
	}

	#container, .container {
		width: 96%;
		position: auto;
		left: auto;
		top: auto;
		margin-left: 0;
		margin-top: 0;
	}

	#userIdPSelection, .userIdPSelection {
		width: 60%;
	}

	#userIdPSelection_iddwrap input {
		width:90%!important;
	}
}

html, body, form, fieldset, p, div, h1, h2, h3, h4, h5, h6 {
    -webkit-text-size-adjust:none;
}
/* ============================================================
   G-RISE ON Federation - Custom WAYF Styles
   Appended to default-styles.css by printCSS() in templates.php
   ============================================================ */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body {
    background-color: #eceadf;
    background-image: url('/images/mudeungsan-bg.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
                 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    color: #3a3029;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* Neutralize default SWITCHwayf chrome
   (default-styles.css uses absolute positioning with negative margins;
    we reset to static flow + full width) */
#container,
.container {
    position: static !important;
    left: auto !important;
    top: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

#container .box,
#container #content,
#content, .content {
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    text-align: initial !important;
}

/* Vertically center the card/footer stack in the viewport
   (only when our custom .wayf-card is rendered; error pages use a
   different layout further below) */
#container:has(.wayf-card) #content {
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Hide the default SWITCHwayf chrome only when our .wayf-card is present.
   On error pages the default <h1>/<p> must remain visible - see fallback
   block near the end of this file. */
#container:has(.wayf-card) #header,
#container:has(.wayf-card) #content > ul.menu,
#container:has(.wayf-card) #content > p,
#container:has(.wayf-card) #content > h1 {
    display: none !important;
}

/* Custom WAYF card */
.wayf-card {
    width: 100%;
    max-width: 600px;
    margin: 40px auto 16px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 32px 48px;
    box-sizing: border-box;
}

.wayf-card__title {
    margin: 0 0 8px;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    font-family: inherit;
    padding-bottom: 0;
}

.wayf-card__subtitle {
    margin: 8px 0 24px;
    color: #6b7280;
    font-size: 13px;
    text-align: center;
    line-height: 1.5;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.idp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}

/* Federation view: auto-sized responsive grid for variable IdP count */
.idp-grid--federation {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 4px;
}

.idp-btn-text {
    font-size: 12px;
    color: #374151;
    text-align: center;
    line-height: 1.3;
    font-family: inherit;
    word-break: keep-all;
    font-weight: 500;
    padding: 0 4px;
}

.idp-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
    padding: 24px 0;
    margin: 0;
}

.idp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 70px;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.idp-btn:hover {
    background-color: #f0fdf4;
    border-color: #007062;
    box-shadow: 0 2px 8px rgba(0, 112, 98, 0.15);
}

.idp-btn:focus {
    outline: 2px solid #007062;
    outline-offset: 2px;
}

.idp-btn img {
    max-width: 100%;
    max-height: 45px;
    object-fit: contain;
    pointer-events: none;
}

.idp-btn--pending {
    cursor: not-allowed;
}

.idp-btn--pending:hover {
    background-color: #ffffff;
    border-color: #e5e7eb;
    box-shadow: none;
}

.idp-btn--pending img {
    filter: grayscale(60%) opacity(0.5);
}

.idp-pending-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.4);
    border-radius: inherit;
    pointer-events: none;
}

.idp-pending-overlay span {
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-size: 11px;
    font-family: inherit;
    padding: 3px 10px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.wayf-footer {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 24px;
    text-align: center;
    color: rgba(58, 48, 41, 0.7);
    font-size: 12px;
    padding: 8px 16px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* Hide the SWITCHwayf invisible helpers accessibly */
.idp-visually-hidden {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Responsive */
@media (max-width: 640px) {
    .wayf-card {
        margin: 24px 16px;
        padding: 24px;
    }
    .idp-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 420px) {
    .idp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   Error fallback
   When SWITCHwayf cannot render the custom .wayf-card (e.g. the
   requesting SP is missing from federation metadata, the entityID
   is invalid, or the return URL is rejected) the default template
   emits only <h1>/<p> inside #content. The rules above hide those
   in the happy path so the plain error would otherwise be invisible
   against the background image. Restore a readable error card here.
   ============================================================ */
#container:not(:has(.wayf-card)) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    padding: 24px !important;
    box-sizing: border-box !important;
}

#container:not(:has(.wayf-card)) .box {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 32px 40px;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    box-sizing: border-box;
    text-align: left !important;
}

#container:not(:has(.wayf-card)) #header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 20px !important;
    padding: 0 0 16px !important;
    border-bottom: 1px solid #e5e7eb;
    width: 100%;
    box-sizing: border-box;
}

#container:not(:has(.wayf-card)) #header img {
    max-height: 40px;
    width: auto;
    float: none !important;
    border: 0;
}

#container:not(:has(.wayf-card)) #content {
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: 100%;
}

#container:not(:has(.wayf-card)) #content > h1 {
    display: block !important;
    order: 1;
    color: #b91c1c;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px;
    padding: 0;
    font-family: inherit;
    text-align: left;
    line-height: 1.4;
}

#container:not(:has(.wayf-card)) #content > p {
    display: block !important;
    order: 2;
    color: #374151;
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 12px;
    text-align: left;
    font-family: inherit;
}

#container:not(:has(.wayf-card)) #content > p code {
    background: #fef2f2;
    color: #991b1b;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    word-break: break-all;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

#container:not(:has(.wayf-card)) #content > p a {
    color: #007062;
}

#container:not(:has(.wayf-card)) #content > ul.menu {
    display: flex !important;
    order: 3;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 16px;
    width: 100%;
    margin: 20px 0 0 !important;
    padding: 16px 0 0 !important;
    background: none !important;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    line-height: 1.4;
    float: none !important;
    list-style: none;
}

#container:not(:has(.wayf-card)) #content > ul.menu li,
#container:not(:has(.wayf-card)) #content > ul.menu li.last {
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    list-style: none;
    line-height: inherit;
}

#container:not(:has(.wayf-card)) #content > ul.menu a {
    color: #6b7280;
    text-decoration: none;
}

#container:not(:has(.wayf-card)) #content > ul.menu a:hover {
    color: #007062;
    text-decoration: underline;
}
